1. Field of the Invention
The present invention relates to an information processing apparatus capable of reducing the time required for booting itself when it is powered on, and a method of booting an information processing apparatus at a high speed.
2. Description of the Prior Art
In accordance with a prior art method of booting an information processing apparatus, a firmware or F/W code stored in a programmable read only memory (ROM) loads a bootstrap code, called boot, into memory, as shown in for example xe2x80x9cBooting up Systemxe2x80x9d, Chapter 13, pp.413-433 in xe2x80x9cThe Design and Implementation of the UNIX 4.3BSDxe2x80x9d, translated by Akira Nakamura et al., Maruzen, Jun. 30, 1991. The boot program then loads an operating system or OS stored in a file system into memory. The OS is then started and goes through initialization. After that, the OS starts execution of a first process or program, called init, to be executed first after the OS goes through initialization. Applications can then run on the OS.
Since the prior art method of booting an information processing apparatus comprises the steps of the F/W code loading the bootstrap code stored in a boot block of a boot device into memory, the F/W code starting execution of the bootstrap code, the bootstrap code loading the OS stored in the file system of the boot device into memory, and the bootstrap code starting execution of the OS, much time is required to start execution of the OS. Further, another problem with the prior art method is that since the OS cannot start execution of applications to be started automatically when the information processing apparatus is booted up until the OS finishes going through initialization perfectly, much time is required to start execution of such applications when booting up the information processing apparatus.
The present invention is made to overcome the above problems. It is therefore an object of the present invention to provide an information processing apparatus and a method capable of reducing the time required for booting up itself when it is powered on, and also reducing the time required to start execution of applications to be started automatically when the information processing apparatus is booted up.
In accordance with an aspect of the present invention, there is provided an information processing apparatus comprising: a boot device divided into a boot block in which a mini operating system (OS) module having a function required for bootstrap processing is located and a file system in which an operating system (OS) main body module having functions other than the function of bootstrap; and a read-only memory or ROM in which a firmware or F/W code module is located for loading the mini OS module located in the boot block into a memory and for starting execution of the mini OS module instead of a bootstrap code when booting up the information processing apparatus, the mini OS module loading the OS main body module from the file system of the boot device into the memory, and the mini OS module being linked to the OS main body module.
In accordance with another aspect of the present invention, there is provided a method of booting up an information processing apparatus comprising a boot device and a memory by loading an operating system into the memory, comprising the steps of: dividing the operating system into a mini operating system (OS) module having a function required for bootstrap processing and an operating system (OS) main body module having functions other than the function of bootstrap, the mini OS module including a mini kernel module that is a basic part of the operating system, a boot device driver module for performing input/output (I/O) operations on the boot device, and an OS loading and initialization processing module for loading the OS main body module into the memory and for initializing the OS main body module; locating the mini OS module in a boot block of the boot device; locating the OS main body module in a file system of the boot device; a firmware or F/W code module being stored in a ROM and loading the mini OS module located in the boot block into the memory when booting up the information processing apparatus; the mini OS module initializing the mini kernel module and the boot device driver module; the mini OS module generating and starting execution of a thread for the OS loading and initialization processing module; and the OS loading and initialization processing module loading the OS main body module stored in the file system into the memory and then initializing the OS main body module.
In accordance with a preferred embodiment of the present invention, the OS main body module is divided into a plurality of functional modules including a device driver module, which are located as separate files in the file system, and the OS loading and initialization processing module is divided into an OS loading processing module for loading each of the plurality of functional modules into the memory and an OS initialization module for initializing each of the plurality of functional modules loaded into the memory by the OS loading processing module. Further, after the mini OS module is loaded into the memory, the mini OS module initializes the mini kernel module and the boot device driver module and then generates and starts execution of a thread for the OS loading processing module. After the thread for the OS loading processing module is started, the OS loading processing module loads each of the plurality of functional modules into the memory and then generates and starts execution of a thread for the OS initialization module every time it loads each of the plurality of functional modules. After the thread for the OS initialization module is started, the OS initialization module initializes each of the plurality of functional modules loaded into the memory.
In accordance with another preferred embodiment of the present invention, the mini OS module includes a thread synchronization module for providing synchronization between a thread for the OS loading processing module and a thread for the OS initialization module using the mini kernel module. Further, the mini OS module generates and starts execution of a thread for the OS loading processing module and a thread for the OS initialization module after the mini OS module initializes the mini kernel module and the boot device driver module. After those threads are started, the OS initialization module brings itself into a state in which it is waiting for a request for initialization of a functional module through the thread synchronization module. Every time the OS loading processing module loads each of the plurality of functional modules into the memory, the OS loading processing module makes a request of the OS initialization module for initialization of each of the plurality of functional modules through the thread synchronization module. The OS initialization module initializes each of the plurality of functional modules loaded into the memory every time the OS initialization module receives a request for initialization of each of the plurality of functional modules loaded into the memory from the OS loading processing module, and then waits for another request for initialization.
In accordance with another preferred embodiment of the present invention, the plurality of functional modules, into which the OS main body module is divided, are stored as compressed files in the file system and the loading and initialization processing module of the mini OS module is divided into an OS loading and decompression processing module and an OS initialization module. Further, the mini OS module generates and starts execution of a thread for the OS loading and decompression processing module after the mini OS module initializes the mini kernel module and the boot device driver module. After the thread for the OS loading and decompression processing module is started, the OS loading and decompression processing module loads each of the plurality of functional modules into the memory and decompresses the loaded functional module, and then generates and starts execution of a thread for the OS initialization module. After the thread for the OS initialization module is executed, the OS initialization module initializes each of the plurality of functional modules loaded into the memory and decompressed.
In accordance with another preferred embodiment of the present invention, the OS loading and decompression processing module is divided into an OS loading processing module and an OS decompression processing module. Further, the mini OS module generates and starts execution of a thread for the OS loading processing module after the mini OS module initializes the mini kernel module and the boot device driver module. After the thread for the OS loading processing module is started, the OS loading processing module loads each of the plurality of compressed functional modules into the memory, and then generates and starts execution of a thread for the OS decompression processing module. After the thread for the OS decompression processing module is started, the OS decompression processing module decompresses each of the plurality of compressed functional module loaded into the memory and then generates and starts execution of a thread for the OS initialization module. And, after the thread for the OS initialization module is started, the OS initialization module initializes each of the functional modules loaded into the memory and decompressed by the OS decompression processing module.
In accordance with another preferred embodiment of the present invention, the OS loading processing module of the mini OS module is an application (AP) execution and OS loading processing module for starting execution of at least a predetermined application module which is located in the file system and which can automatically be started and run on the operating system when booting up the information processing apparatus, and for loading each of the plurality of functional modules into the memory. Further, the predetermined application module includes a function definition file in which some functional modules required for the application module to run on the operating system are listed. After the mini OS module is loaded into the memory, the mini OS module initializes the mini kernel module and the boot device driver module and then generates and starts execution of a thread for the AP execution and OS loading processing module. After the thread for the AP execution and OS loading processing module is started, the AP execution and OS loading processing module loads the application nodule from the file system into the memory and further loads some functional modules required for the application module into the memory according to the function definition file included in the application module, and then generates and starts execution of a thread for the OS initialization module. After the thread for the OS initialization module is started, the OS initialization module then initializes each of the some functional modules loaded into the memory. And, after the initialization of all of the some functional modules is completed, the application execution and OS loading processing module further loads the remainder of all functional modules included in the OS main body module into the memory and initializes the remainder using the OS initialization processing module while starting execution of the application module as a process.
In accordance with another preferred embodiment of the present invention, the OS loading and initialization processing module of the mini OS module is divided into an OS loading processing module and an OS initialization module, the OS main body module is divided into a plurality of blocks of arbitrary record size, each of which includes a loading flag consisting of a plurality of bits respectively corresponding to the plurality of functional modules included in the OS main body module. Further, the loading flag of one of the plurality of blocks including the end of any one of the plurality of functional modules has a corresponding bit set to a predetermined value. After the mini OS module is loaded into the memory, the mini OS module initializes the mini kernel module and the boot device driver module and then generates and starts execution of a thread for the OS loading processing module. After the thread for the OS loading processing module is started, the loading processing module loads each of the plurality of blocks of the OS main body module into the memory, and refers to the loading flag every time it loads each of the plurality of blocks into the memory. Only if a bit of the loading flag is set to a predetermined value, the OS loading processing module generates and starts execution of a thread for the OS initialization module. And, after the thread for the OS initialization module is started, the OS initialization module initializes a corresponding one of the plurality of functional modules loaded into the memory.
In accordance with another preferred embodiment of the present invention, the OS loading and initialization processing module is divided into an OS loading processing module and an OS initialization module, and the OS main body module is divided into a plurality of blocks of arbitrary record size, each of which includes a loading flag. Further, the loading flag of one of the plurality of blocks including the end of any one of the plurality of functional modules has the address of a linkage processing function of linking the one functional module with the mini OS module and the address of an initialization processing function of initializing the one functional module. After the mini OS module is loaded into the memory, the mini OS module initializes the mini kernel module and the boot device driver module and then generates and starts execution of a thread for the OS loading processing module. After the thread for the OS loading processing module is started, the loading processing module loads each of the plurality of blocks of the OS main body module into the memory, and refers to the loading flag every time it loads each of the plurality of blocks into the memory. Only if the loading flag has a value other than zero, the OS loading processing module generates and starts execution of a thread for the OS initialization module. And, after the thread for the OS initialization module is started, the OS initialization module calls a linkage processing function and an initialization processing function according to the value of the loading flag.
In accordance with another preferred embodiment of the present invention, the method further comprises the steps of, in order to generate the mini OS module and the OS main body module, combining an object file of the mini OS module and an object file of the OS main body module into an operating system file by using a linkage editor or linker, and dividing the operating system file into the mini OS module and the OS main body module according to link information.
In accordance with another aspect of the present invention, there is provided a method of booting up an information processing apparatus comprising a boot device and a memory by loading an operating system into the memory, comprising the steps of: dividing the operating system into a mini operating system (OS) module having, a function required for bootstrap processing and an operating system (OS) main body module having functions other than the function of bootstrap, the mini OS module including a mini kernel module that is a basic part of the operating system, a boot device driver module for performing input/output (I/O) operations on the boot device, and an OS loading and initialization processing module for loading the OS main body module into the memory and for initializing the OS main body module; locating the mini OS module in a read-only memory or ROM; locating the OS main body module in a file system of the boot device; a firmware or F/W code module being stored in the ROM and directly executing the mini OS module located in the ROM when booting up the information processing apparatus; the mini OS module loading only data portions of the mini kernel module, the boot device driver module, and the OS loading and initialization processing module into the memory; the mini OS module initializing the mini kernel module and the boot device driver module; the mini OS module generating and starting execution of a thread for the OS loading and initialization processing module; and the OS loading and initialization processing module loading the OS main body module stored in the file system into the memory and then initializing the OS main body-module.
In accordance with another preferred embodiment of the present invention, the mini OS module further includes an address resolve table used for linking the mini OS module with the OS main body module. Further, after the mini OS module generates and starts execution of a thread for the OS loading and initialization processing module, the OS loading and initialization processing module loads the OS main body module into the memory and then initializes it, loads a first process to be executed first, into the memory, loads code portions of the mini kernel module and the boot device driver module into the memory, and writes addresses of the code portions loaded into the memory into the address resolve table.
Further objects and advantages of the present invention will be apparent from the following description of the preferred embodiments of the invention as illustrated in the accompanying drawings.